import request from './request'
/**
 * 
 * @returns 
 * 管理员列表
 */
export const manageList = (params) => {
    return request({
        url: '/AdminUser',
        method: 'get',
        params
    })
}
/**
 * 
 * @returns 
 * 为管理员分配角色
 */
export const manageRole = (data) => {
    return request({
        url: '/Role/role_admin_user',
        method: 'post',
        data
    })
}
/**
 * 
 * @param {*} data 
 * @returns 
 * 添加管理员
 */
export const manageAdd = (params) => {
    return request({
        url: '/AdminUser/create',
        method: 'get',
        params
    })
}
/**
 * 
 * @param {*} params 
 * @returns 
 * 管理员编辑
 */
export const manageEdit = (id, params) => {
    return request({
        url: `/AdminUser/${id}`,
        method: 'put',
        params
    })
}
/**
 * 
 * @param {*} id 
 * @returns 
 * 删除管理员
 */
export const manageRemove = (id) => {
    return request({
        url: `/AdminUser/${id}`,
        method: 'delete',
    })
}
/**
 * 
 * @returns 
 * 获取平台的基础设置
 */
export const setConfig = () => {
    return request({
        url: '/Config',
        method: 'get',
    })
}
